<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core" xmlns:p="http://primefaces.org/ui">
<ui:composition template="/resources/template/template.xhtml">

	<ui:define name="title">
		<h:outputText value="Accueil" />
	</ui:define>

	<ui:define name="content">
		<ui:repeat value="#{accueilBean.listeNews}" var="news">
			<p:panel styleClass="border-none">
				<h:outputText value="#{news.titre}" styleClass="font-bold" />
				<div class="news-description">
					<h:outputText value="#{news.dateCreation}">
						<f:convertDateTime pattern="dd/MM/yyyy HH:mm:ss" />
					</h:outputText>
					<h:outputText value="par #{news.utilisateur.nomPrenom}" styleClass="margin-left-s" />
				</div>
				<f:facet name="footer">
					<h:outputText value="#{news.contenu}" escape="false" />
				</f:facet>
			</p:panel>
		</ui:repeat>
	</ui:define>

	<ui:define name="dialog">

	</ui:define>

</ui:composition>
</html>